#include <QCoreApplication>
#include <math.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int n,k=0;
    do
        {
            printf("\nVvedite chislo: ");
            scanf("%d", &n);
            if(n<=1) printf("  Error enter!");
        }while(n<=1);
    while(pow(3,k)<n) k++;
    printf("\neto chislo = %d", k-1);

    return 0;
}
